<template>
	<view class="layout">
		<common-title></common-title>
		<view class="previews">
			<view class="box" v-for="(item, index) in showurls" @click="goPreview">					
				<image :src="item" mode="widthFix"></image>						
			</view>			
		</view>
	</view>
</template>

<script setup>
import { ref } from 'vue';
import {onLoad,onUnload,onReachBottom,onShareAppMessage,onShareTimeline} from "@dcloudio/uni-app";
const baseurl = ref("https://aitestgo-bj.oss-cn-beijing.aliyuncs.com/docker/alg/uniapp/ui2/ui_db/")
const showurls = ref([])
onLoad((e)=>{	
	for (let i = 0; i < 5; i++) {
		let formatted = i.toString().padStart(3, '0');
		let url = baseurl.value + e.type + "/preview_" + formatted + ".jpg"
		showurls.value.push(url);
	}
	//console.log(e.type)
})
</script>

<style lang="scss" scoped>
.layout{
	width:100%;
	.previews{
		width:100%;
		.box{
			width:100%;
			image{
				padding: 0rpx 5rpx 0rpx 5rpx;
				width:100%;
			}
		}
	}
	
}
</style>
